package com.hyc.myvideo.data.api.model;

/**
 * 回调信息统一封装类
 */
public class BaseResult<T> {
    //判断标示
    private int code;
    //提示信息
    private String msg;
    //显示数据
    private T result;

    public boolean isCode() {
        return this.code > 0;
    }

    public BaseResult() {
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", result=" + result +
                '}';
    }
}
